package com.atguigu.gulimall.product.service;

import com.atguigu.gulimall.product.vo.AttrGroupRelationVo;
import com.atguigu.gulimall.product.vo.AttrRespVo;
import com.atguigu.gulimall.product.vo.AttrVo;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.product.entity.AttrEntity;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.function.Function;

/**
 * 商品属性
 *
 * @author zhibeiyou
 * @email 2507102972@qq.com
 * @date 2021-09-17 10:01:38
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVo attr);

    @Override
    default boolean save(AttrEntity entity) {
        return false;
    }

    @Override
    default boolean saveBatch(Collection<AttrEntity> entityList, int batchSize) {
        return false;
    }

    @Override
    default boolean saveOrUpdateBatch(Collection<AttrEntity> entityList, int batchSize) {
        return false;
    }

    @Override
    default boolean removeById(Serializable id) {
        return false;
    }

    @Override
    default boolean removeByMap(Map<String, Object> columnMap) {
        return false;
    }

    @Override
    default boolean remove(Wrapper<AttrEntity> queryWrapper) {
        return false;
    }

    @Override
    default boolean removeByIds(Collection<? extends Serializable> idList) {
        return false;
    }

    @Override
    default boolean updateById(AttrEntity entity) {
        return false;
    }

    @Override
    default boolean update(AttrEntity entity, Wrapper<AttrEntity> updateWrapper) {
        return false;
    }

    @Override
    default boolean updateBatchById(Collection<AttrEntity> entityList, int batchSize) {
        return false;
    }

    @Override
    default boolean saveOrUpdate(AttrEntity entity) {
        return false;
    }

    @Override
    default AttrEntity getById(Serializable id) {
        return null;
    }

    @Override
    default Collection<AttrEntity> listByIds(Collection<? extends Serializable> idList) {
        return null;
    }

    @Override
    default Collection<AttrEntity> listByMap(Map<String, Object> columnMap) {
        return null;
    }

    @Override
    default AttrEntity getOne(Wrapper<AttrEntity> queryWrapper, boolean throwEx) {
        return null;
    }

    @Override
    default Map<String, Object> getMap(Wrapper<AttrEntity> queryWrapper) {
        return null;
    }

    @Override
    default <V> V getObj(Wrapper<AttrEntity> queryWrapper, Function<? super Object, V> mapper) {
        return null;
    }

    @Override
    default int count(Wrapper<AttrEntity> queryWrapper) {
        return 0;
    }

    @Override
    default List<AttrEntity> list(Wrapper<AttrEntity> queryWrapper) {
        return null;
    }

    @Override
    default IPage<AttrEntity> page(IPage<AttrEntity> page, Wrapper<AttrEntity> queryWrapper) {
        return null;
    }

    @Override
    default List<Map<String, Object>> listMaps(Wrapper<AttrEntity> queryWrapper) {
        return null;
    }

    @Override
    default <V> List<V> listObjs(Wrapper<AttrEntity> queryWrapper, Function<? super Object, V> mapper) {
        return null;
    }

    @Override
    default IPage<Map<String, Object>> pageMaps(IPage<AttrEntity> page, Wrapper<AttrEntity> queryWrapper) {
        return null;
    }

    @Override
    default BaseMapper<AttrEntity> getBaseMapper() {
        return null;
    }

    PageUtils queryBaseAttrPage(Map<String, Object> params, Long catelogId, String type);

    AttrRespVo getAtrInfoId(Long attrId);

    void updateAttr(AttrVo attr);

    List<AttrEntity> getRelationAttr(Long attrgruopId);


    PageUtils getNoRelationAttr(Map<String, Object> params, Long attrgruopId);
}

